Skip to content

[WIP] Global work to make build for macos arm #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 26 commits into
base: master
Choose a base branch
from

Conversation

miry
Copy link
Owner

@miry miry commented Jan 5, 2024

Upgrade LLVM for crystal.pkg build as for homebrew: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/c/crystal.rb

miry added 26 commits January 4, 2024 19:19
```
Environment:
  CFLAGS="-I/Users/miry/tmp/crystal/embedded/include -O3 -D_FORTIFY_SOURCE=2 -fstack-protector -fPIC -arch arm64 -arch x86_64 -target arm64-apple-darwin"
  CPPFLAGS="-I/Users/miry/tmp/crystal/embedded/include -O3 -D_FORTIFY_SOURCE=2 -fstack-protector -fPIC "
  CRYSTAL_LIBRARY_PATH="/Users/miry/tmp/crystal/embedded/lib"
  CRYSTAL_PATH="lib:/private/var/cache/omnibus/src/crystal/src:/Users/miry/src/crystal/distribution-scripts/omnibus/local/src/crystal/src"
  CXXFLAGS="-I/Users/miry/tmp/crystal/embedded/include -O3 -D_FORTIFY_SOURCE=2 -fstack-protector -fPIC -arch arm64 -arch x86_64 -target arm64-apple-darwin"
  LDFLAGS="-Wl,-rpath,/Users/miry/tmp/crystal/embedded/lib -L/Users/miry/tmp/crystal/embedded/lib"
  LD_RUN_PATH="/Users/miry/tmp/crystal/embedded/lib"
  LIBRARY_PATH="/Users/miry/tmp/crystal/embedded/lib:/opt/homebrew/lib"
  OMNIBUS_INSTALL_DIR="/Users/miry/tmp/crystal"

$ llvm-config --host-target
arm64-apple-darwin23.0.0

$ make crystal stats=true release=true FLAGS="--no-debug" CRYSTAL_CONFIG_LIBRARY_PATH= O=/Users/miry/tmp/crystal/embedded/bin
Using /usr/local/bin/llvm-config [version= 15.0.7]
CRYSTAL_CONFIG_BUILD_COMMIT="1f592eca6" CRYSTAL_CONFIG_PATH='$ORIGIN/../share/crystal/src' SOURCE_DATE_EPOCH="1699639716"  CRYSTAL_CONFIG_LIBRARY_PATH= ./bin/crystal build --no-debug -D strict_multi_assign -D preview_overload_order --release --stats -Dwithout_interpreter  -o /Users/miry/tmp/crystal/embedded/bin/crystal src/compiler/crystal.cr -D without_openssl -D without_zlib -D use_pcre2

$ file /Users/miry/tmp/crystal/embedded/bin/crystal
/Users/miry/tmp/crystal/embedded/bin/crystal: Mach-O 64-bit executable arm64
```

The target builds the same as for arm target, because it uses default target for host.
…somewhere else, as there is git interactions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant